<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.tenton.*"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
	<title>用户管理</title>
	<style>
		.border_distance{
			border:2px solid #CD8090;
		}
		.border_distance tr td{
			border:1px solid #CD6889;
		}
	</style>
</head>
<body  bgcolor="pink">
    <h2 align="center">用户信息管理</h2>
	<hr>
	<table class="border_distance" width="800" align="center"  bgcolor="white">
		<thead>
		<tr>
			<form action="/selectUserByIdServlet" method="post">
				<td>
					<input type="text" name="id" placeholder="输入用户id进行查询" />
				</td>
				<td align="center" colspan="9">
					<input type="submit" value="查&nbsp;询"/>
				</td>
			</form>
		</tr>
		<tr bgcolor="#DB7093">
			<td align="center" width="30">用户Id</td>
			<td align="center" width="60">用户名</td>
			<td align="center" width="80">用户密码</td>
			<td align="center" width="80">用户姓名</td>
			<td align="center" width="100">联系电话</td>
			<td align="center" width="100">家庭地址</td>
			<td align="center" width="80">所在国家</td>
			<td align="center" width="80">所在城市</td>
			<td align="center" width="100">邮箱</td>
			<td align="center" width="80">兴趣爱好</td>
			<td align="center" width="80">密保问题</td>
			<td align="center" width="80">密保答案</td>
			<td align="center" width="80">创建时间</td>
			<td align="center" width="80">修改操作</td>
			<td align="center" width="80">删除操作</td>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${requestScope.users}" var="user">
		<tr>
			<td style="width: 30px">${user.id}</td>
			<td style="width: 60px">${user.userName}</td>
			<td style="width: 80px">${user.password}</td>
			<td style="width: 80px">${user.fullName}</td>
			<td style="width: 80px">${user.tel}</td>
			<td style="width: 80px">${user.address}</td>
		    <td style="width: 80px">${user.country}</td>
		    <td style="width: 80px">${user.city}</td>
		    <td style="width: 80px">${user.email}</td>
		    <td style="width: 80px">${user.hobby}</td>
		    <td style="width: 80px">${user.problem}</td>
		    <td style="width: 80px">${user.answers}</td>
		    <td style="width: 80px">${user.createTime}<td>
		    <td style="width: 80px">
				<a href="/toUpdateUserServlet?id=${user.id}">修改信息</a>
			</td>
		    <td style="width: 80px">
				<a href="/deleteUserServlet?id=${user.id}">删除信息</a>
			</td>
		</tr>
		</c:forEach>
		<tr align="center">
		<td colspan="10">
			<a href="regist.jsp">添加用户信息</a>
		</td>
		</tr>
		</tbody>
	</table>
</body>
</html>